/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package controller.commands;

import java.util.ArrayList;

/**
 *
 * @author Jelle
 */
public class MacroCommand extends BasicCommand {

    private ArrayList<BasicCommand> commands;

    public MacroCommand(ArrayList<BasicCommand> commands) {
        this.commands = commands;
    }

    @Override
    public void execute() {
        for (BasicCommand c : commands) {
            c.setGview(this.gview);
            c.setCModel(this.cmodel);
            c.setGModel(this.gmodel);
            c.setController(controller);
            c.setSync(this.sync);
            c.execute();
        }
    }
}
